import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart';

class DemoIosVideo extends StatefulWidget {
  DemoIosVideo({Key key}) : super(key: key);

  @override
  _DemoIosVideoState createState() => _DemoIosVideoState();
}

class _DemoIosVideoState extends State<DemoIosVideo> {

 final _picker = ImagePicker();
  String _imgPath;
  @override
  Widget build(BuildContext context) {
     return Scaffold(
      appBar: AppBar(
      
        title: Text(''),
      ),
      body: Center(

        child: Column(
            children: <Widget>[
             
             FloatingActionButton(
              onPressed: _takePhoto,
              tooltip: 'Pick Image',
              child: Icon(Icons.add_a_photo)
             ),
            
              
            ],
          )
      ),
       
      
     
    );
  }

  
   _takePhoto() async {
     PickedFile video = await _picker.getVideo(source:ImageSource.camera);
  print('fffffffffffffffffff:'+ video.path);
    setState(() {
      _imgPath = video.path.toString();
    });
  }
}
